﻿using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
using CommunityToolkit.Mvvm.Messaging;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WpfApp19
{
    public partial class WindowViewModel : ObservableObject
    {
        [ObservableProperty]
        private string? _name;

        [ObservableProperty]
        private string? _title;

        [RelayCommand]
        private void Show(string content)
        {
            Name = "按键按下了";
            Title = "我是标题，我变化了";

            WeakReferenceMessenger.Default.Send(content,"Token1");
        }

    }
}
